/*! 
 *
 * \author Jim@Jimblogger.com
 *
 * \version See SVN revision.
 *
 * \date 11AUG2011
 *
 * Contact: jim@jimblogger.com
*/
#include <string>
#include <vector>
#include <cstring>
#include <iostream>
#include "csvrecord.hpp"
#include <fstream>

using namespace std;


namespace com{
namespace jimblogger{
	 /*! \brief This class is a template class for create other source code examples.
         *
         * All example should be buildable using cmake.
         */ 
	class csvparser{
		public:
                /*! constructor */
                csvparser();
                /*! deconstructor */
                ~csvparser();
		/** \brief Adds an record (struct) to the internal collection.
		*/	
		void addRow(com::jimblogger::csvrecord);
		com::jimblogger::csvrecord getRow(int);
		int size();
		void readCSV(std::string);

		private:
		/** \brief This private function parses one line (record) from a CSV file . */
		void parseCSVLine(std::string);
		vector <csvrecord> collection;


	};
}}
